var win = Titanium.UI.currentWindow;
win.backgroundColor='#fff';
if (Ti.Platform.osname == 'iphone'){
	var aviso = Titanium.UI.createActivityIndicator({
   	 bottom:50, 
 	   height:55,
 	   width:190,
 	   color:'#FFFFFF',
  	  backgroundColor:'#000',
  	  opacity:0.9,
  	  borderRadius:5,
  	  borderColor:'#000',
  	  font:{fontFamily:'Helvetica Neue', fontSize:13},
  	  message:'Espere Porfavor...',	
  	 //style:Titanium.UI.iPhone.ActivityIndicatorStyle.PLAIN
	});
}
else {
var aviso = Titanium.UI.createActivityIndicator({
    height:40,
    width:10,
    message:'Espere Porfavor...',	
});
aviso.show();
}
	aviso.show();

var webview = Titanium.UI.createWebView({url:'calendario.html'});
    win.add(webview);
    win.add(aviso);
webview.addEventListener('beforeload',function(e){
	aviso.show();
});
webview.addEventListener('load',function(e){
	aviso.hide();
});
if (Ti.Platform.osname == 'iphone'){
	var r = Titanium.UI.createButton({
		systemButton:Titanium.UI.iPhone.SystemButton.REFRESH
	});
	r.addEventListener('click',function()
	{
		// reload feed
		webview.url='calendario.html';	
	});
	Titanium.UI.currentWindow.setRightNavButton(r);
}
